﻿<%@ Page Title="MyInfo" Language="C#"  MasterPageFile="~/MasterPage/Foreground.Master" AutoEventWireup="true" CodeBehind="MyInfo.aspx.cs" Inherits="Planetwork.MyInfo" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style>
        #imageInfo{
            margin:25px;
            width:250px;
            height:300px;
            
        }
        #imageInfo #image{
           box-shadow: 0 0 5px green;
           width: 250px;
           height: 230px;
           margin:12px;
           text-align:center;
        }
        #imageInfo #uploadDate{
            height:40px;
            text-align:center;
            font-size: 16px;
        }
        #imageInfo #delete{
            height:30px;
        }
    </style>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <br />
     <ul class="breadcrumb">
        <li><span class="glyphicon glyphicon-home"> 首页</span></li>
        <li class="active" id="currentNavPage"> 个人中心</li>
    </ul>
    <div class="col-sm-10 col-sm-offset-1">
        <ul class="nav nav-tabs">
            <li class="active"> <a href="#myInfo" data-toggle="tab">个人信息</a> </li>
            <li><a href="#myMessages" data-toggle="tab">管理留言</a></li>
            <li><a href="#myPhoto" data-toggle="tab">管理相片</a></li>
        </ul>
        <br />
        <div class="tab-content">
            <!-- 管理信息开始 -->
            <div class="tab-pane fade in active col-cneter-block col-sm-7" id="myInfo">
                <div class="form-group">
                    <label>账号</label>
                    <asp:TextBox runat="server" ID="UserName" Enabled="false" CssClass="form-control"></asp:TextBox>
                </div>
                <div class="form-group">
                    <label>邮箱</label>
                    <asp:TextBox runat="server" ID="Email" CssClass="form-control" TextMode="Email"></asp:TextBox>
                </div>
                <div class="form-group">
                    <label>名字</label>
                    <asp:TextBox runat="server" ID="Name" CssClass="form-control"></asp:TextBox>
                </div>
                <div class="form-group">
                    <label>密码</label>
                    <asp:TextBox runat="server" ID="Password" CssClass="form-control"></asp:TextBox>
                </div>
                <div class="form-group">
                    <label>生日</label>
                    <asp:TextBox runat="server" ID="Birth" CssClass="form-control" TextMode="Date"></asp:TextBox>
                </div>
                <div class="form-group">
                    <label>个人简介</label>
                    <asp:TextBox runat="server" ID="Biog" CssClass="form-control" TextMode="MultiLine"></asp:TextBox>
                </div>
                <asp:Button runat="server" CssClass="col-cneter-block btn btn-default" ID="SavaMyInfo"  Text="保存" OnClick="SavaMyInfo_Click"/>
            </div>
            <!-- 管理信息结束 -->

            <!-- 管理留言开始 -->
            <div class="tab-pane fade" id="myMessages">
               <asp:GridView  ID="showMessage" runat="server" DataKeyField="ID" AutoGenerateColumns="false" OnRowCommand="showMessage_RowCommand" CssClass="table table-hover table-responsive" >
                   <Columns>
                       <asp:BoundField DataField="Title" HeaderText="留言模板块" />
                       <asp:BoundField DataField="ReviewDate" HeaderText="留言时间" />
                       <asp:BoundField DataField="Content" HeaderText="留言内容" />
                       <asp:TemplateField>
                           <ItemTemplate>
                               <asp:Button ID="deleteBtn" CommandName="del" CommandArgument='<%# Eval("ID") %>'  CssClass="btn btn-sm btn-danger center-block" runat="server" Text="删除"/>
                           </ItemTemplate>
                       </asp:TemplateField>
                   </Columns>
               </asp:GridView>
            </div>
            <!-- 管理信息结束 -->

            <!-- 管理图片开始 -->
            <div class="tab-pane fade" id="myPhoto">
                <asp:DataList ID="showImageInfo" RepeatColumns="3" RepeatDirection="Horizontal" runat="server" OnDeleteCommand="showImageInfo_DeleteCommand">
                    <ItemTemplate>
                        <div id="imageInfo">
                             <div id="image">
                                <asp:Image runat="server" ImageUrl='<%# "../GetImage/GetImage.aspx?GigPicsImg=" + Eval("ID") %>' Width="250" Height="230" />
                             </div>
                            
                             <div id="uploadDate">
                                <p><%# "上传于  " +  Eval("UploadDate")%></p>
                             </div>
                                                       
                             <div id="delete">
                                 <asp:Button ID="delBtn" CommandName="Delete" CommandArgument='<%# Eval("ID") %>' runat="server" class="btn btn-danger col-cneter-block" Text="删除"  />
                             </div>
                         </div>
                    </ItemTemplate>
                </asp:DataList>

            </div>
            <!-- 管理图片结束 -->
        </div>
    </div>
    <script type="text/javascript">
       
    </script>
</asp:Content>
